package com.easy.mapper;

import com.easy.bean.Order;
import com.easy.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderMapper {
    int add(@Param("order")Order order) ;
    int del(@Param("id") String id) ;
    int edit(@Param("order") Order order) ;
    Order one(@Param("id") String id) ;

    int cancel(@Param("id") String id) ;
    int commit(@Param("id") String id) ;
    int timeOut(@Param("id") String id) ;


    // 查找已过期的订单
    List<Order> findExpiredOrders(@Param("currentTime")LocalDateTime currentTime);


}
